#ifndef IODEV_H
#define IODEV_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#define GPIO_OUT1_GZ 59
#define GPIO_OUT2_GZ 58
#define GPIO_OUT3_GZ 56
#define GPIO_OUT4_GZ 57

#define GPIO_IN1_GZ  52
#define GPIO_IN2_GZ  51
#define GPIO_IN3_GZ  54
#define GPIO_IN4_GZ  50

#define GPIOD1_GZ    62
#define GPIOD2_GZ    65

#define ON  1
#define OFF 0
typedef struct ctrl_type
{
                int port;
                int value;
}ctrl_type;
class ioDev
{
public:
    ioDev(int fd);
    ctrl_type dataBuf;
    int fd;
    void io_ctrl(int port,int val);
    int io_read();
};

#endif // IODEV_H
